import Vue from 'vue'
import Router from 'vue-router'

// 登陆
import login from "@/views/Login";

const originalPush = Router.prototype.push

Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

Vue.use(Router)

// const originalPush = Router.prototype.push
// Router.prototype.push = function push (location) {
//   return originalPush.call(this, location);
// }

const router = new Router({
    routes: [
        // 认证登录
        {
            path: '/',
            name: 'login',
            component: login
        },
    ]
})

export default router
